home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C++ für Kids
/
C++ for kids.iso
/
Buch
/
Noten1a.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1998-12-13
|
1KB
|
33 lines
//---------------------------------------------------------------------------
#include <vcl\vcl.h>
#pragma hdrstop
#include "Noten1a.h"
//---------------------------------------------------------------------------
#pragma resource "*.dfm"
TForm1 *Form1;
int Zensur;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
try
{
Zensur = StrToInt (Edit1->Text);
if (Zensur == 1) Label1->Caption = "sehr gut";
if (Zensur == 2) Label1->Caption = "gut";
if (Zensur == 3) Label1->Caption = "befriedigend";
if (Zensur == 4) Label1->Caption = "ausreichend";
if (Zensur == 5) Label1->Caption = "mangelhaft";
if (Zensur == 6) Label1->Caption = "ungenⁿgend";
}
catch (...)
{
Label1->Caption = "Quatsch!";
}
}
//---------------------------------------------------------------------------